package com.xu.demo.bridgePattern;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;

/**
 * 桥接模式
 */
public class BridgePattern {

    public static void main(String[] args) {

//        Abstraction abstraction = new RefinedAbstraction(new ConcreteImplementorA());
//        abstraction.operation(); // 输出: Concrete ImplementorA operation.
//
//        abstraction.setImplementor(new ConcreteImplementorB());
//        abstraction.operation(); // 输出: Concrete ImplementorB operation.

        List<String> list = Arrays.asList("hello","world");
        List<Long> list2 = createFixedZeroList(list);
        list2.forEach(System.out::println);

    }


    public static List<Long> createFixedZeroList(List<String> dateList) {
        return new ArrayList<>(Collections.nCopies(dateList.size(),0L));
        //Collections.fill(fixedList, 0L);
//        return fixedList;
    }

}
